Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Fix some CI tests #238

Merged
merged 10 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: start omicron locally
- name: Start omicron locally
shell: bash
run: |
make start-omicron
docker logs nexus

- name: Run cargo test
run: |
Expand Down
2 changes: 0 additions & 2 deletions src/cmd_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,7 @@ mod test {
want_err: String,
}

// TODO(https://github.com/oxidecomputer/cli/issues/204): Fix this test.
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
#[ignore]
#[serial_test::serial]
async fn test_cmd_auth() {
let test_host =
Expand Down
4 changes: 3 additions & 1 deletion src/colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ impl ColorScheme {
#[cfg(test)]
mod test {
use pretty_assertions::assert_eq;
use serial_test::serial;
use test_context::{test_context, TestContext};

use super::*;
Expand Down Expand Up @@ -195,7 +196,7 @@ mod test {

#[test_context(Context)]
#[test]
#[serial_test::serial]
#[serial]
fn test_env_color_disabled() {
let tests = vec![
TestItem {
Expand Down Expand Up @@ -247,6 +248,7 @@ mod test {

#[test_context(Context)]
#[test]
#[serial]
fn test_env_color_forced() {
let tests = vec![
TestItem {
Expand Down
1 change: 1 addition & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ impl AsyncTestContext for MainContext {
}

// TODO(https://github.com/oxidecomputer/cli/issues/204): Fix this test.
// Currently breaks trying to get `test_sled_id` in the test context setup.
#[test_context(MainContext)]
#[ignore]
#[tokio::test]
Expand Down
5 changes: 3 additions & 2 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ mod test {
use pretty_assertions::assert_eq;

// TODO(https://github.com/oxidecomputer/cli/issues/204): Fix this test.
// This test seems to be broken because dl.oxide.computer responds with
// <?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>
// for any release.
#[tokio::test]
#[ignore]
async fn test_download_binary_to_temp_file() {
Expand Down Expand Up @@ -291,9 +294,7 @@ mod test {
);
}

// TODO(https://github.com/oxidecomputer/cli/issues/204): Fix this test.
#[tokio::test]
#[ignore]
#[serial_test::serial]
async fn test_check_for_update() {
let result = super::check_for_update("0.0.1", true).await.unwrap();
Expand Down
18 changes: 12 additions & 6 deletions tests/omicron.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# Oxide API: example configuration file
#

# Identifier for this instance of Nexus
id = "e6bff1ff-24fb-49dc-a54e-c6a350cd4d6c"

[console]
# Directory for static assets. Absolute path or relative to CWD.
static_dir = "nexus/static" # TODO: figure out value
Expand All @@ -21,21 +18,30 @@ session_absolute_timeout_minutes = 480
# TODO(https://github.com/oxidecomputer/omicron/issues/372): Remove "spoof".
schemes_external = ["spoof", "session_cookie"]

[database]
[deployment]
# Identifier for this instance of Nexus
id = "e6bff1ff-24fb-49dc-a54e-c6a350cd4d6c"
rack_id = "c19a698f-c6f9-4a17-ae30-20d711b8f7dc"

[deployment.database]
# URL for connecting to the database
type = "from_url"
url = "postgresql://root@0.0.0.0:26257/omicron?sslmode=disable"

[dropshot_external]
[deployment.dropshot_external]
# IP address and TCP port on which to listen for the external API
bind_address = "0.0.0.0:8888"
# Allow larger request bodies (1MiB) to accomodate firewall endpoints (one
# rule is ~500 bytes)
request_body_max_bytes = 1048576

[dropshot_internal]
[deployment.dropshot_internal]
# IP address and TCP port on which to listen for the internal API
bind_address = "0.0.0.0:12221"

[deployment.subnet]
net = "fd00:1122:3344:0100::/56"

[log]
# Show log messages of this level and more severe
level = "info"
Expand Down