(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestNewGlibcPatchFlake(t *testing.T) { |
| 34 | stdenv := flake.Ref{ |
| 35 | Type: flake.TypeGitHub, |
| 36 | URL: "https://github.com/NixOS/nixpkgs", |
| 37 | Ref: "nixpkgs-unstable", |
| 38 | } |
| 39 | |
| 40 | packages := devpkg.PackagesFromStringsWithOptions([]string{"python@latest"}, &lockMock{}, devopt.AddOpts{ |
| 41 | Patch: string(configfile.PatchAlways), |
| 42 | }) |
| 43 | |
| 44 | patchFlake, err := newGlibcPatchFlake(stdenv, packages) |
| 45 | if err != nil { |
| 46 | t.Fatalf("expected no error, got %v", err) |
| 47 | } |
| 48 | |
| 49 | if patchFlake.NixpkgsGlibcFlakeRef != stdenv.String() { |
| 50 | t.Errorf("expected NixpkgsGlibcFlakeRef to be %s, got %s", stdenv.String(), patchFlake.NixpkgsGlibcFlakeRef) |
| 51 | } |
| 52 | |
| 53 | if len(patchFlake.Outputs.Packages) != 1 { |
| 54 | t.Errorf("expected 1 package in Outputs, got %d", len(patchFlake.Outputs.Packages)) |
| 55 | } |
| 56 | } |
nothing calls this directly
no test coverage detected