mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-05 13:15:26 +02:00
fixes
This commit is contained in:
parent
377b800c9b
commit
55fdb249f8
@ -179,11 +179,11 @@ func LoadReader(fd io.Reader) (config Project, err error) {
|
||||
if err != nil {
|
||||
return config, err
|
||||
}
|
||||
err = yaml.Unmarshal(data, &config)
|
||||
if err := yaml.Unmarshal(data, &config); err != nil {
|
||||
return config, err
|
||||
}
|
||||
log.WithField("config", config).Debug("loaded config file")
|
||||
|
||||
err = checkOverflows(config)
|
||||
return
|
||||
return config, checkOverflows(config)
|
||||
}
|
||||
|
||||
func checkOverflows(config Project) error {
|
||||
|
@ -15,28 +15,25 @@ func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
func TestRunPipeNoSummary(t *testing.T) {
|
||||
var assert = assert.New(t)
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{
|
||||
Snapcraft: config.Snapcraft{
|
||||
Description: "dummy",
|
||||
},
|
||||
func TestRunPipeMissingInfo(t *testing.T) {
|
||||
for name, snap := range map[string]config.Snapcraft{
|
||||
"missing summary": config.Snapcraft{
|
||||
Description: "dummy desc",
|
||||
},
|
||||
}
|
||||
assert.NoError(Pipe{}.Run(ctx))
|
||||
}
|
||||
|
||||
func TestRunPipeNoDescription(t *testing.T) {
|
||||
var assert = assert.New(t)
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{
|
||||
Snapcraft: config.Snapcraft{
|
||||
Summary: "dummy",
|
||||
},
|
||||
"missing description": config.Snapcraft{
|
||||
Summary: "dummy summary",
|
||||
},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
var assert = assert.New(t)
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{
|
||||
Snapcraft: snap,
|
||||
},
|
||||
}
|
||||
assert.NoError(Pipe{}.Run(ctx))
|
||||
})
|
||||
}
|
||||
assert.NoError(Pipe{}.Run(ctx))
|
||||
}
|
||||
|
||||
func TestRunPipe(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user