Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OSDF test for StatHTTP #961

Closed
joereuss12 opened this issue Mar 18, 2024 · 1 comment
Closed

Make OSDF test for StatHTTP #961

joereuss12 opened this issue Mar 18, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@joereuss12
Copy link
Contributor

Has 2 pelican:// tests for now and need to change one to be an osdf test. Waiting for a #878 merge to do this

@joereuss12 joereuss12 added the enhancement New feature or request label Mar 18, 2024
@joereuss12 joereuss12 added this to the v7.7.0 milestone Mar 18, 2024
@joereuss12 joereuss12 self-assigned this Mar 18, 2024
@joereuss12 joereuss12 modified the milestones: v7.7.0, v7.8.0 Apr 11, 2024
@joereuss12
Copy link
Contributor Author

This is done already:

pelican/client/fed_test.go

Lines 422 to 439 in b8040c0

t.Run("testStatHttpOSDFScheme", func(t *testing.T) {
_, err := config.SetPreferredPrefix("OSDF")
assert.NoError(t, err)
testFileContent := "test file content"
// Drop the testFileContent into the origin directory
tempFile, err := os.Create(filepath.Join(fed.Exports[0].StoragePrefix, "test.txt"))
assert.NoError(t, err, "Error creating temp file")
_, err = tempFile.WriteString(testFileContent)
assert.NoError(t, err, "Error writing to temp file")
tempFile.Close()
viper.Set("Logging.DisableProgressBars", true)
tempPath := tempFile.Name()
fileName := filepath.Base(tempPath)
uploadURL := fmt.Sprintf("osdf://%s/%s", fed.Exports[0].FederationPrefix, fileName)
hostname := fmt.Sprintf("%v:%v", param.Server_WebHost.GetString(), param.Server_WebPort.GetInt())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant