Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on basic testing #23

Closed
wants to merge 13 commits into from
Closed

Commits on Mar 10, 2024

  1. Turn on basic testing

    I _wanted_ to turn on the automated tests that we have, but it fails because
    pytest is not installed. @couryrr-afs can you please fix the automated tests so
    we can include them as well.
    
    <details>
    <summary>Existing automated e2e tests fail</summary>
    
    ```
    $ bash demo-automated-testing.sh
    [+] Building 0.0s (0/0)                                    docker:desktop-linux
    [+] Running 2/0
     ✔ Container everest-ac-demo-mqtt-server-1  Created                        0.0s
     ✔ Container everest-ac-demo-manager-1      Created                        0.0s
    Attaching to everest-ac-demo-manager-1, everest-ac-demo-mqtt-server-1
    everest-ac-demo-mqtt-server-1  | 1710048535: mosquitto version 2.0.10 starting
    everest-ac-demo-mqtt-server-1  | 1710048535: Config loaded from /mosquitto/config/mosquitto.conf.
    everest-ac-demo-mqtt-server-1  | 1710048535: Opening ipv4 listen socket on port 1883.
    everest-ac-demo-mqtt-server-1  | 1710048535: Opening websockets listen socket on port 9001.
    everest-ac-demo-mqtt-server-1  | 1710048535: mosquitto version 2.0.10 running
    everest-ac-demo-manager-1      | ./run-test.sh: line 3: pytest: not found
    everest-ac-demo-manager-1 exited with code 127
    ```
    </details>
    
    Signed-off-by: Shankari <[email protected]>
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    7d44a4f View commit details
    Browse the repository at this point in the history
  2. Turn it on for pull requests so we can test that it works

    Signed-off-by: Shankari <[email protected]>
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    73e5d71 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64872a5 View commit details
    Browse the repository at this point in the history
  4. Set a timeout so that the action doesn't run forever

    When we have true automated tests, we will not need this, but the scripts all
    currently run without -d and expect UI interaction, so we will timeout.
    Note that this means that the action will always be canceled, but not much we
    can do to avoid that now.
    
    Signed-off-by: Shankari <[email protected]>
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    f33a589 View commit details
    Browse the repository at this point in the history
  5. Set a timeout so that the action doesn't run forever

    When we have true automated tests, we will not need this, but the scripts all
    currently run without -d and expect UI interaction, so we will timeout.
    Note that this means that the action will always be canceled, but not much we
    can do to avoid that now.
    
    Signed-off-by: Shankari <[email protected]>
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    008e0cb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ba9b907 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b4fb099 View commit details
    Browse the repository at this point in the history
  8. Switch to mac and install docker

    To be as close to the laptop environment as possible
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    5d42259 View commit details
    Browse the repository at this point in the history
  9. Bump up timeout to 20 minutes

    Since 10 minutes is too short for OSX
    
    ```
     c9a245e33d92 Extracting [=================>                                 ]  357.1MB/1.048GB
     c9a245e33d92 Extracting [=================>                                 ]  357.6MB/1.048GB
     c9a245e33d92 Extracting [=================>                                 ]  358.2MB/1.048GB
     c9a245e33d92 Extracting [=================>                                 ]  358.7MB/1.048GB
     c9a245e33d92 Extracting [=================>                                 ]  359.3MB/1.048GB
    Error: The action 'Download and launch' has timed out after 10 minutes.
    ```
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    2c9692e View commit details
    Browse the repository at this point in the history
  10. Bump up the timeout to 30 mins

    Download takes 20 mins
    Build should take another 10 mins
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    05528d4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b9a4b84 View commit details
    Browse the repository at this point in the history
  12. Let's check the colima version

    Signed-off-by: Shankari <[email protected]>
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    12f393c View commit details
    Browse the repository at this point in the history
  13. And create the host folder if we need to

    Although the error is likely because we are trying to mount a directory outside
    $HOME and /tmp/colima
    shankari committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    304e16c View commit details
    Browse the repository at this point in the history