Skip to content

Commit

Permalink
fix download test cd back out of the directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gschoeni committed Feb 16, 2025
1 parent 80ff4f8 commit 607914e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cli-test/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ def run_system_command(cmd)
regexp = ".env".force_encoding('UTF-16LE')
Dotenv.load(regexp.encode('UTF-8'))
run_system_command("oxen config --name ruby-test --email [email protected]")
run_system_command("oxen config --auth dev.hub.oxen.ai #{ENV['OXEN_API_KEY']}")
system("oxen delete-remote --name EloyMartinez/performance-test --host dev.hub.oxen.ai -y")
system("oxen delete-remote --name ox/performance-test --host localhost:3000 -y")
end

config.after(:each) do
# Ensure the remote repository is deleted after each test
system("oxen delete-remote --name EloyMartinez/performance-test --host dev.hub.oxen.ai -y")
system("oxen delete-remote --name ox/performance-test --host localhost:3000 -y")
end
end
4 changes: 4 additions & 0 deletions cli-test/spec/test_cases/download/tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ def generate_unique_id

# Verify file contents
expect(File.read(File.join('hi2.txt'))).to eq("This is a simple text file.\n")

# Return to cli-test
parent_path = File.join('..', '..')
Dir.chdir(parent_path)
end
end
2 changes: 1 addition & 1 deletion cli-test/spec/test_cases/rm/tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
expect(File.exist?(File.join(directory_path, 'root.txt'))).to be false
expect(File.exist?(File.join(directory_path, nested_path))).to be false

# Return to cli-test
# Return to cli-test
parent_path = File.join('..', '..')
Dir.chdir(parent_path)

Expand Down

0 comments on commit 607914e

Please sign in to comment.