Browse Source

ci: use go1.23, drop go1.21 (#2933)

sukun/upgrade-stun
sukun 3 months ago
committed by GitHub
parent
commit
f535990da5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/go-test.yml
  2. 3
      p2p/net/nat/nat_test.go

2
.github/workflows/go-test.yml

@ -17,6 +17,6 @@ jobs:
go-test: go-test:
uses: ./.github/workflows/go-test-template.yml uses: ./.github/workflows/go-test-template.yml
with: with:
go-versions: '["1.21.x", "1.22.x"]' go-versions: '["1.22.x", "1.23.x"]'
secrets: secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

3
p2p/net/nat/nat_test.go

@ -45,7 +45,8 @@ func TestAddMapping(t *testing.T) {
require.False(t, found, "didn't expect a port mapping for unmapped protocol") require.False(t, found, "didn't expect a port mapping for unmapped protocol")
mapped, found := nat.GetMapping("tcp", 10000) mapped, found := nat.GetMapping("tcp", 10000)
require.True(t, found, "expected port mapping") require.True(t, found, "expected port mapping")
require.Equal(t, netip.AddrPortFrom(netip.AddrFrom4([4]byte{1, 2, 3, 4}), 1234), mapped) addr, _ := netip.AddrFromSlice(net.IPv4(1, 2, 3, 4))
require.Equal(t, netip.AddrPortFrom(addr, 1234), mapped)
} }
func TestRemoveMapping(t *testing.T) { func TestRemoveMapping(t *testing.T) {

Loading…
Cancel
Save