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

fix: typos #1879

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/gsutil/gsutil-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gsutil -o "Credentials:gs_json_host=127.0.0.1" -o "Credentials:gs_json_port=4443
# list objects in the bucket (should be empty)
gsutil -o "Credentials:gs_json_host=127.0.0.1" -o "Credentials:gs_json_port=4443" -o "Boto:https_validate_certificates=False" ls -p "${project_id}" "gs://${bucket_name}"

# upload a couple of fileds
# upload a couple of files
gsutil -o "Credentials:gs_json_host=127.0.0.1" -o "Credentials:gs_json_port=4443" -o "Boto:https_validate_certificates=False" cp "${here}"/hello.txt "${here}"/image.png "gs://${bucket_name}/"

# list objects in the bucket (should include the files that were just uploaded)
Expand Down
2 changes: 1 addition & 1 deletion examples/python/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# 1 - Build the docker image by running the command "docker build -t fsouza/fake-gcs-server ."
# 2 - Start the docker container: "docker run -d --name fake-gcs-server -p 4443:4443 -v ${PWD}/examples/data:/data fsouza/fake-gcs-server -scheme http"
# 3 - Check if it's working by running: "curl http://0.0.0.0:4443/storage/v1/b"
# 4 - Create a python virtual enviroment (Ex: python -m .venv venv)
# 4 - Create a python virtual environment (Ex: python -m .venv venv)
# 5 - Source the env (source .venv/bin/activate)
# 7 - Go to the following directory examples/python: (cd examples/python)
# 6 - Install requirements: "pip install -r requirements.txt"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fakestorage/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ func (s *Server) rewriteObject(r *http.Request) jsonResponse {
return jsonResponse{errorMessage: "Invalid metadata", status: http.StatusBadRequest}
}

// Only supplied metadata overwrites the new object's metdata
// Only supplied metadata overwrites the new object's metadata
if len(metadata.Metadata) == 0 {
metadata.Metadata = obj.Metadata
}
Expand Down
4 changes: 2 additions & 2 deletions fakestorage/object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func TestServerClientObjectTranscoding(t *testing.T) {
const (
bucketName = "some-bucket"
objectName = "items/data.txt"
content = "some nice content, which will be gziped"
content = "some nice content, which will be gzipped"
contentType = "text/plain; charset=utf-8"
contentEncoding = "gzip"
)
Expand Down Expand Up @@ -471,7 +471,7 @@ func TestServerClientObjectSkipTranscoding(t *testing.T) {
const (
bucketName = "some-bucket"
objectName = "items/data.txt"
content = "some nice content, which will be gziped"
content = "some nice content, which will be gzipped"
contentType = "text/plain; charset=utf-8"
contentEncoding = "gzip"
)
Expand Down
4 changes: 2 additions & 2 deletions fakestorage/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestGenerateObjectsFromFiles(t *testing.T) {
},
},
{
name: "should skip inexistent folder",
name: "should skip nonexistent folder",
folder: "../testdata/i-dont-exist",
},
{
Expand Down Expand Up @@ -458,7 +458,7 @@ func TestDownloadPartialPublicHostMatch(t *testing.T) {
}
}

func TestDownloadPartialHostValidationShouldntValidatePortPartially(t *testing.T) {
func TestDownloadPartialHostValidationShouldNotValidatePortPartially(t *testing.T) {
server, err := NewServerWithOptions(Options{PublicHost: "127.0.0.1", InitialObjects: []Object{
{ObjectAttrs: ObjectAttrs{BucketName: "some-bucket", Name: "files/txt/text-01.txt"}, Content: []byte("something")},
}})
Expand Down
4 changes: 2 additions & 2 deletions internal/backend/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (s *storageFS) CreateObject(obj StreamingObject, conditions Conditions) (St
}

// ListObjects lists the objects in a given bucket with a given prefix and
// delimeter.
// delimiter.
func (s *storageFS) ListObjects(bucketName string, prefix string, versions bool) ([]ObjectAttrs, error) {
s.mtx.RLock()
defer s.mtx.RUnlock()
Expand Down Expand Up @@ -318,7 +318,7 @@ func (s *storageFS) GetObject(bucketName, objectName string) (StreamingObject, e
return s.getObject(bucketName, objectName)
}

// GetObjectWithGeneration retrieves an specific version of the object. Not
// GetObjectWithGeneration retrieves a specific version of the object. Not
// implemented for this backend.
func (s *storageFS) GetObjectWithGeneration(bucketName, objectName string, generation int64) (StreamingObject, error) {
obj, err := s.GetObject(bucketName, objectName)
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package backend proides the backends used by fake-gcs-server.
// Package backend provides the backends used by fake-gcs-server.
package backend

type Conditions interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/notification/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ type PubsubEventManager struct {
notifyOn EventNotificationOptions
// writer is where logs are written to.
writer io.Writer
// bucket, if not empty, only objects from this bucker will generate trigger events.
// bucket, if not empty, only objects from this bucket will generate trigger events.
bucket string
// objectPrefix, if not empty, only objects having this prefix will generate
// trigger events.
Expand Down
Loading