Skip to content

Commit

Permalink
feat: tests structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kukkok3 committed Dec 14, 2023
1 parent d5792ab commit b3fce40
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
8 changes: 4 additions & 4 deletions catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ builder:

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SETUP --toolchain=rust-toolchain.toml

COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates .
COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates tests .

# Test rust build container - Use best architecture host tools.
check-hosted:
Expand All @@ -18,15 +18,15 @@ check-hosted:

# Test which runs check with all supported host tooling. Needs qemu or rosetta to run.
# Only used to validate tooling is working across host toolsets.
check-all-hosts:
check-all-hosts:
BUILD --platform=linux/amd64 --platform=linux/arm64 +check-hosted

build-hosted:
ARG TARGETPLATFORM

# Build the service
FROM +builder

RUN /scripts/std_build.sh

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SMOKE_TEST --bin=cat-gateway
Expand All @@ -36,7 +36,7 @@ build-hosted:

# Test which runs check with all supported host tooling. Needs qemu or rosetta to run.
# Only used to validate tooling is working across host toolsets.
build-all-hosts:
build-all-hosts:
BUILD --platform=linux/amd64 --platform=linux/arm64 +build-hosted

## -----------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions catalyst-gateway/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ publish = false

[dev-dependencies]

[[test]]
name = "integration"
path = "integration/main.rs"

[[test]]
name = "end2end"
path = "end2end/main.rs"
Expand Down
14 changes: 14 additions & 0 deletions catalyst-gateway/tests/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
VERSION 0.7

test-integration:
FROM ../+builder
RUN cargo nextest run --test integration


test-end2end:
FROM ../+builder
RUN cargo nextest run --test end2end

test-nonfunctional:
FROM ../+builder
RUN cargo nextest run --test nonfunctional
4 changes: 4 additions & 0 deletions catalyst-gateway/tests/integration/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[test]
pub fn integration(){
assert!(true);
}

0 comments on commit b3fce40

Please sign in to comment.