Skip to content

Commit

Permalink
Avoid test flakes when creating new projects
Browse files Browse the repository at this point in the history
  • Loading branch information
enj committed Aug 2, 2016
1 parent ee7ca0f commit be9fe27
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/cmd/projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ os::cmd::expect_failure_and_text 'oc projects test_arg' 'no arguments'
os::cmd::expect_success 'oc login -u test -p test'
os::cmd::expect_success_and_text 'oc projects' 'You are not a member of any projects'
# add a project and expect text for a single project
os::cmd::expect_success_and_text 'oc new-project test4; sleep 2; oc projects' 'You have one project on this server: "test4".'
os::cmd::expect_success_and_text 'oc new-project test5; sleep 2; oc projects' 'You have access'
os::cmd::expect_success_and_text 'oc new-project test4' 'Now using project "test4" on server '
# avoid flakes in case of slow server update
os::cmd::try_until_text 'oc projects' 'You have one project on this server: "test4".'
os::cmd::expect_success_and_text 'oc new-project test5' 'Now using project "test5" on server '
os::cmd::try_until_text 'oc projects' 'You have access to the following projects and can switch between them with '
os::cmd::expect_success_and_text 'oc projects' 'test4'
os::cmd::expect_success_and_text 'oc projects' 'test5'
echo 'projects command ok'
os::test::junit::declare_suite_end

0 comments on commit be9fe27

Please sign in to comment.