mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
feat: add Dockerfile / Docker-driven CI job
This commit is contained in:
parent
a1976273e7
commit
5aca0ea5b1
6 changed files with 99 additions and 138 deletions
|
|
@ -591,22 +591,22 @@ func TestIfBothSmartCropOptionsAreIdentical(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSkipCropIfTooSmall(t *testing.T) {
|
||||
testCases := [] struct {
|
||||
name string
|
||||
testCases := []struct {
|
||||
name string
|
||||
options Options
|
||||
} {
|
||||
{
|
||||
name: "smart crop",
|
||||
options: Options{
|
||||
Width: 140,
|
||||
Height: 140,
|
||||
Crop: true,
|
||||
Gravity: GravitySmart,
|
||||
},
|
||||
}{
|
||||
{
|
||||
name: "smart crop",
|
||||
options: Options{
|
||||
Width: 140,
|
||||
Height: 140,
|
||||
Crop: true,
|
||||
Gravity: GravitySmart,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "centre crop",
|
||||
options: Options{
|
||||
options: Options{
|
||||
Width: 140,
|
||||
Height: 140,
|
||||
Crop: true,
|
||||
|
|
@ -615,19 +615,19 @@ func TestSkipCropIfTooSmall(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "embed",
|
||||
options: Options{
|
||||
Width: 140,
|
||||
Height: 140,
|
||||
options: Options{
|
||||
Width: 140,
|
||||
Height: 140,
|
||||
Embed: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "extract",
|
||||
options: Options{
|
||||
Top: 0,
|
||||
Left: 0,
|
||||
AreaWidth: 140,
|
||||
AreaHeight: 140,
|
||||
options: Options{
|
||||
Top: 0,
|
||||
Left: 0,
|
||||
AreaWidth: 140,
|
||||
AreaHeight: 140,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue