github.com/henvic/wedeploycli@v1.7.6-0.20200319005353-3630f582f284/functional/tests/list.exp (about)

     1  #!/usr/bin/expect
     2  
     3  spawn $env(SHELL)
     4  
     5  Feature: "List"
     6  
     7  Scenario: "List with no projects" {
     8    send "$::bin list\r"
     9    expect {
    10      timeout { handle_timeout }
    11      "No project found."
    12    }
    13  }
    14  
    15  Scenario: "List project with no services" {
    16    set list1 [prefixed_project list1]
    17    create_project "$list1"
    18  
    19    send "$::bin list\r"
    20    expect {
    21      timeout { handle_timeout }
    22      "$list1*zero services deployed"
    23    }
    24  } { delete_project "$list1" }
    25  
    26  Scenario: "List project and services" {
    27    set list2 [prefixed_project list2]
    28    create_project "$list2"
    29    create_service "$list2" "hosting1"
    30    create_service "$list2" "hosting2"
    31  
    32    send "$::bin list\r"
    33    expect {
    34      timeout {handle_timeout}
    35      -re "list2.*hosting1-$list2\.$::_service_domain.*wedeploy/hosting.*none\
    36          .*list2.*hosting2-$list2\.$::_service_domain.*wedeploy/hosting.*none"
    37    }
    38  } { delete_project "$list2" }