diff options
author | Pascal Bach <pascal.bach@nextrem.ch> | 2017-07-08 00:11:44 +0200 |
---|---|---|
committer | Pascal Bach <pascal.bach@nextrem.ch> | 2017-07-09 15:19:50 +0200 |
commit | 0fb8456b1316797cc6cd45814b3250e432eeef77 (patch) | |
tree | a579dca9c63b005e4875b48e22d463af661aec8d /nixos/tests/minio.nix | |
parent | 4cccbc256c3225c1cbfc58faff7149cc59b98be4 (diff) | |
download | nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.tar nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.tar.gz nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.tar.bz2 nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.tar.lz nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.tar.xz nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.tar.zst nixpkgs-0fb8456b1316797cc6cd45814b3250e432eeef77.zip |
minio service: add additional config options
Set access and secret key and disable browser. Tests extended to do real operations against minio.
Diffstat (limited to 'nixos/tests/minio.nix')
-rw-r--r-- | nixos/tests/minio.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/nixos/tests/minio.nix b/nixos/tests/minio.nix index 462a3bc4768..a349265b2f5 100644 --- a/nixos/tests/minio.nix +++ b/nixos/tests/minio.nix @@ -4,8 +4,15 @@ import ./make-test.nix ({ pkgs, ...} : { maintainers = [ bachp ]; }; - machine = { config, pkgs, ... }: { - services.minio.enable = true; + nodes = { + machine = { config, pkgs, ... }: { + services.minio = { + enable = true; + accessKey = "BKIKJAA5BMMU2RHO6IBB"; + secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12"; + }; + environment.systemPackages = [ pkgs.minio-client ]; + }; }; testScript = @@ -14,6 +21,12 @@ import ./make-test.nix ({ pkgs, ...} : { $machine->waitForUnit("minio.service"); $machine->waitForOpenPort(9000); $machine->succeed("curl --fail http://localhost:9000/minio/index.html"); + + # Create a test bucket on the server + $machine->succeed("mc config host add minio http://localhost:9000 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12 S3v4"); + $machine->succeed("mc mb minio/test-bucket"); + $machine->succeed("mc ls minio") =~ /test-bucket/ or die; $machine->shutdown; + ''; }) |