Skip to content

Commit

Permalink
WIP: Add debugging statements to understand windows failures
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Jun 11, 2023
1 parent 0c2376c commit f041971
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type OSDFConfig struct {
//
func GetPreferredPrefix() string {
arg0 := strings.ToUpper(path.Base(os.Args[0]))
log.Errorln("Current arg0:", arg0)
underscore_idx := strings.Index(arg0, "_")
if underscore_idx != -1 {
return arg0[0:underscore_idx]
Expand Down
2 changes: 2 additions & 0 deletions namespaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package stashcp

import (
"os"
"fmt"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -158,6 +159,7 @@ func TestDownloadNamespaces(t *testing.T) {
os.Setenv("STASH_NAMESPACE_URL", "https://topology-itb.opensciencegrid.org/stashcache/namespaces")
viper.Reset()
config.Init()
fmt.Printf("Prefix %s; STASH_NAMESPACE_URL: %s; config NamespaceURL: %s", config.GetPreferredPrefix(), os.Getenv("STASH_NAMESPACE_URL"), viper.GetString("NamespaceURL"))
defer os.Unsetenv("STASH_NAMESPACE_URL")
namespaceBytes, err := downloadNamespace()
assert.NoError(t, err, "Failed to download namespaces")
Expand Down

0 comments on commit f041971

Please sign in to comment.