Skip to content

Commit

Permalink
create bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Oct 25, 2023
1 parent 1d79901 commit bdcf41e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:

services:
minio:
image: lazybit/minio
image: minio/minio:edge-cicd
ports:
- 9000:9000
env:
Expand Down
25 changes: 25 additions & 0 deletions test/pakman/push_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,38 @@ defmodule Pakman.PushTest do
setup do
bypass = Bypass.open()

storage = %{
"host" => "localhost",
"port" => 9000,
"scheme" => "http://",
"region" => "auto",
"bucket" => "test",
"credential" => %{
"access_key_id" => "minioadmin",
"secret_access_key" => "minioadmin"
}
}

ex_aws_config =
ExAws.Config.new(:s3,
access_key_id: storage["credential"]["access_key_id"],
secret_access_key: storage["credential"]["secret_access_key"],
host: storage["host"],
port: storage["port"],
scheme: storage["scheme"],
region: storage["region"]
)

System.put_env("HOME", "test/fixtures")
System.put_env("GITHUB_WORKSPACE", "")
System.put_env("INSTELLAR_ENDPOINT", "http://localhost:#{bypass.port}")
System.put_env("INSTELLAR_PACKAGE_TOKEN", "something")
System.put_env("WORKFLOW_SHA", "somesha")
System.put_env("GITHUB_REPOSITORY", "upmaru-stage/locomo")

ExAws.S3.put_bucket(storage["bucket"], storage["region"])
|> ExAws.request(Keyword.new(ex_aws_config))

{:ok, bypass: bypass}
end

Expand Down

0 comments on commit bdcf41e

Please sign in to comment.