mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-19 20:57:53 +02:00
more brew tests
This commit is contained in:
parent
3bc428120d
commit
8ca8809d0d
@ -115,6 +115,34 @@ func TestRunPipe(t *testing.T) {
|
|||||||
assert.True(client.CreatedFile)
|
assert.True(client.CreatedFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRunPipeBrewNotSetup(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
var ctx = &context.Context{
|
||||||
|
Config: config.Project{
|
||||||
|
Archive: config.Archive{
|
||||||
|
Format: "tar.gz",
|
||||||
|
},
|
||||||
|
Brew: config.Homebrew{
|
||||||
|
GitHub: config.Repo{
|
||||||
|
Owner: "test",
|
||||||
|
Name: "test",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
client := &DummyClient{}
|
||||||
|
assert.Equal(ErrNoDarwin64Build, doRun(ctx, client))
|
||||||
|
assert.False(client.CreatedFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestRunPipeNoDarwinBuild(t *testing.T) {
|
||||||
|
assert := assert.New(t)
|
||||||
|
var ctx = &context.Context{}
|
||||||
|
client := &DummyClient{}
|
||||||
|
assert.NoError(doRun(ctx, client))
|
||||||
|
assert.False(client.CreatedFile)
|
||||||
|
}
|
||||||
|
|
||||||
type DummyClient struct {
|
type DummyClient struct {
|
||||||
CreatedFile bool
|
CreatedFile bool
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user