From d5366b771ecc5bd3ca9b0d752f4eb1fa6e436036 Mon Sep 17 00:00:00 2001 From: David Son Date: Fri, 13 Oct 2023 18:28:44 +0000 Subject: [PATCH] Add example config TOML Signed-off-by: David Son --- integration/run_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/integration/run_test.go b/integration/run_test.go index d46092fc8..a82e14ef8 100644 --- a/integration/run_test.go +++ b/integration/run_test.go @@ -39,6 +39,7 @@ import ( "fmt" "io" "math" + "os" "regexp" "strconv" "strings" @@ -49,6 +50,21 @@ import ( shell "github.com/awslabs/soci-snapshotter/util/dockershell" ) +func TestRunWithDefaultConfig(t *testing.T) { + b, err := os.ReadFile("../config/config.toml") // example toml file + if err != nil { + t.Fatalf("error fetching example toml") + } + config := string(b) + + sh, c := newSnapshotterBaseShell(t) + defer c() + + rebootContainerd(t, sh, getContainerdConfigToml(t, false), getSnapshotterConfigToml(t, false, config)) + // This will error internally if it fails to boot. If it boots successfully, + // the config was successfully parsed and snapshotter is running +} + // TestRunMultipleContainers runs multiple containers at the same time and performs a test in each func TestRunMultipleContainers(t *testing.T) {