Skip to content

[Bug]: Unit tests fail on 32-bit archs #644

@dswarbrick

Description

@dswarbrick

go Version

go version go1.23.2 linux/amd64

API Wrapper Version

github.com/linode/linodego v1.43.0

Code Snippet

n/a

Expected Behavior

Test should pass successfully on all supported Go archs.

Actual Behavior

Unit tests failed to build on 32-bit archs due to untyped int overflows.

$ GOARCH=386 go test ./unit
# github.com/linode/linodego/test/unit [github.com/linode/linodego/test/unit.test]
unit/instance_test.go:92:18: cannot use 30471077120 (untyped int constant) as int value in argument to assert.Equal (overflows)
unit/instance_test.go:93:18: cannot use 22956600198 (untyped int constant) as int value in argument to assert.Equal (overflows)
unit/instance_test.go:94:18: cannot use 53427677318 (untyped int constant) as int value in argument to assert.Equal (overflows)
FAIL    github.com/linode/linodego/test/unit [build failed]
FAIL

Steps to Reproduce

Run tests with a 32-bit GOARCH, e.g. "386".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissues that report a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions