#69 Fix: check project deletion from list of projects
Merged 4 years ago by mkovarik. Opened 4 years ago by mkovarik.
mkovarik/c3i-library fix_project_delete  into  master

@@ -174,7 +174,7 @@ 

    echo "Deleting project ${projectName}..."

    projectSelector.delete()

    timeout(time: 5, unit: 'MINUTES') {

-     while(openshift.selector('project', projectName).count() == 1) {

+     while(projectsSelector.names().contains("project/" + projectName)) {

        echo "Project ${projectName} is still available, waiting"

        sleep(time:2, unit:"SECONDS")

      }

Using count() on project which does not exist returns exception because
user is forbidden to access the project resource - it is not possible to
detect if project does not exist or user does not have access to
project.

Checking list of available project instead counting project. Selector is
dynamically updated each call.

Pull-Request has been merged by mkovarik

4 years ago