diff --git a/Makefile b/Makefile index 88e6475..7ea4587 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,6 @@ .PHONY: default compose infra apps test update env ?= local -# TODO multiple clusters -export KUBECONFIG = $(shell pwd)/cluster/kubeconfig.yaml default: infra @@ -15,7 +13,7 @@ infra: compose temporal workflow start \ --task-queue cloudlab \ --type Infra \ - --input '{ "url": "https://github.com/khuedoan/cloudlab", "revision": "infra-rewrite", "oldRevision": "790763a8166e306f34559870c60e818505117e6b", "stack": "local" }' + --input '{ "url": "https://github.com/khuedoan/cloudlab", "revision": "master", "oldRevision": "790763a8166e306f34559870c60e818505117e6b", "stack": "local" }' apps: # TODO auto bootstrap @@ -27,7 +25,7 @@ platform: test: cd controller && go test ./... - cd test/e2e && go test + cd test && go test fmt: nixfmt flake.nix @@ -39,7 +37,7 @@ fmt: tofu fmt -recursive cd controller && go fmt ./... cd infra/modules/tfstate && go fmt ./... - cd test/e2e && go fmt ./... + cd test && go fmt ./... update: nix flake update diff --git a/flake.nix b/flake.nix index 6bbf17b..1541c9a 100644 --- a/flake.nix +++ b/flake.nix @@ -40,9 +40,11 @@ yamlfmt yamllint - (python3.withPackages (p: with p; [ - kubernetes - ])) + (python3.withPackages ( + p: with p; [ + kubernetes + ] + )) ]; }; }); diff --git a/test/e2e/blog_test.go b/test/e2e/blog_test.go deleted file mode 100644 index 44e65d8..0000000 --- a/test/e2e/blog_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package e2e - -import ( - "net/http" - "testing" -) - -func TestBlog(t *testing.T) { - resp, err := http.Get("https://khuedoan.com") // TODO get domain name automatically - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - t.Fatalf("expected status code to be 200, but got %d", resp.StatusCode) - } -} diff --git a/test/e2e/go.mod b/test/e2e/go.mod deleted file mode 100644 index 1282140..0000000 --- a/test/e2e/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module test/e2e - -go 1.22.5 diff --git a/test/go.mod b/test/go.mod new file mode 100644 index 0000000..0224204 --- /dev/null +++ b/test/go.mod @@ -0,0 +1,3 @@ +module test + +go 1.24.3 diff --git a/test/e2e/homelab_docs_test.go b/test/smoke_test.go similarity index 54% rename from test/e2e/homelab_docs_test.go rename to test/smoke_test.go index 97807ab..d91951e 100644 --- a/test/e2e/homelab_docs_test.go +++ b/test/smoke_test.go @@ -5,6 +5,18 @@ import ( "testing" ) +func TestBlog(t *testing.T) { + resp, err := http.Get("https://khuedoan.com") // TODO get domain name automatically + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + t.Fatalf("expected status code to be 200, but got %d", resp.StatusCode) + } +} + func TestHomelabDocs(t *testing.T) { resp, err := http.Get("https://homelab.khuedoan.com") // TODO get domain name automatically if err != nil {