Bug 1386245

Summary: test/cmd/policy.sh fails when run as standalone test suite
Product: OpenShift Container Platform Reporter: Corey Daley <cdaley>
Component: Test InfrastructureAssignee: Steve Kuznetsov <skuznets>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aos-bugs, jokerman, mmccomas, skuznets
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-28 17:50:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Corey Daley 2016-10-18 13:29:53 UTC
Description of problem:
Test suite test/cmd/policy.sh depends on other test suites running first

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Run test/cmd/policy.sh
2.
3.

Actual results:
Fails on line "os::cmd::expect_success_and_text 'oc policy can-i --list' 'get update.*imagestreams/layers'"
Seemingly because no project exists for the user

Expected results:
Tests should pass

Additional info:

Comment 1 Steve Kuznetsov 2016-10-18 13:34:19 UTC
How did you set up your cluster for the test?

As specified in the documentation[1], a cluster should be started, the current user should have cluster administrative privileges and the test can assume complete control over the current namespace to run. 

[1] https://github.com/openshift/origin/blob/master/test/cmd/README.md#running-tests

Comment 2 Corey Daley 2016-10-18 13:40:49 UTC
That is how it was tested.

1.)  Brought up cluster
2.) Logged in as system:admin
3.) ran test/cmd/policy.sh

Comment 3 Corey Daley 2016-10-28 17:50:42 UTC
Once i executed the tests the correct way it worked fine.