Bug 1386245 - test/cmd/policy.sh fails when run as standalone test suite
Summary: test/cmd/policy.sh fails when run as standalone test suite
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Test Infrastructure
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Steve Kuznetsov
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-18 13:29 UTC by Corey Daley
Modified: 2019-03-29 14:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-28 17:50:42 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.