Skip to content

Commit

Permalink
Add logs for issues in Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont committed Sep 14, 2022
1 parent 99307d1 commit 3abca99
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions integration_oidc_test.go
Expand Up @@ -139,18 +139,26 @@ oidc:
s.FailNow(fmt.Sprintf("Could not determine current path: %s", err), "")
}

baseConfig, _ := os.ReadFile("integration_test/etc_oidc/base_config.yaml")
baseConfig, err := os.ReadFile(
path.Join(currentPath, "integration_test/etc_oidc/base_config.yaml"))
if err != nil {
s.FailNow(fmt.Sprintf("Could not read base config: %s", err), "")
}
config := string(baseConfig) + oidcCfg

log.Println(config)

configPath := path.Join(currentPath, "integration_test/etc_oidc/config.yaml")
err = os.WriteFile(configPath, []byte(config), 0644)
if err != nil {
s.FailNow(fmt.Sprintf("Could not write config: %s", err), "")
}

headscaleOptions := &dockertest.RunOptions{
Name: oidcHeadscaleHostname,
Mounts: []string{
fmt.Sprintf(
"%s/integration_test/etc_oidc:/etc/headscale",
currentPath,
path.Join(currentPath,
"integration_test/etc_oidc:/etc/headscale",
),
},
Cmd: []string{"headscale", "serve"},
Expand Down

0 comments on commit 3abca99

Please sign in to comment.