(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestUpdate(t *testing.T) { |
| 66 | if runtime.GOOS == "windows" { |
| 67 | t.Skip("Windows line breaks cause comparison failures w/ golden files.") |
| 68 | } |
| 69 | |
| 70 | tests := []struct { |
| 71 | name string |
| 72 | entries []*chlog.Entry |
| 73 | changeLogs map[string]string |
| 74 | defaultChangeLogs []string |
| 75 | version string |
| 76 | dry bool |
| 77 | componentFilter string |
| 78 | }{ |
| 79 | { |
| 80 | name: "all_change_types", |
| 81 | entries: getSampleEntries(), |
| 82 | version: "v0.45.0", |
| 83 | }, |
| 84 | { |
| 85 | name: "all_change_types_multiple", |
| 86 | entries: append(getSampleEntries(), getSampleEntries()...), |
| 87 | version: "v0.45.0", |
| 88 | }, |
| 89 | { |
| 90 | name: "dry_run", |
| 91 | entries: getSampleEntries(), |
| 92 | version: "v0.45.0", |
| 93 | dry: true, |
| 94 | }, |
| 95 | { |
| 96 | name: "deprecation_only", |
| 97 | entries: []*chlog.Entry{deprecationEntry()}, |
| 98 | version: "v0.45.0", |
| 99 | }, |
| 100 | { |
| 101 | name: "new_component_only", |
| 102 | entries: []*chlog.Entry{newComponentEntry()}, |
| 103 | version: "v0.45.0", |
| 104 | }, |
| 105 | { |
| 106 | name: "bug_fix_only", |
| 107 | entries: []*chlog.Entry{bugFixEntry()}, |
| 108 | version: "v0.45.0", |
| 109 | }, |
| 110 | { |
| 111 | name: "enhancement_only", |
| 112 | entries: []*chlog.Entry{enhancementEntry()}, |
| 113 | version: "v0.45.0", |
| 114 | }, |
| 115 | { |
| 116 | name: "breaking_only", |
| 117 | entries: []*chlog.Entry{breakingEntry()}, |
| 118 | version: "v0.45.0", |
| 119 | }, |
| 120 | { |
| 121 | name: "subtext", |
| 122 | entries: []*chlog.Entry{entryWithSubtext()}, |
nothing calls this directly
no test coverage detected