Files
cli/pkg/models/sidecar_test.go
zeekay 8f56009cc7 fix: deep audit - remove stubs, fix imports, clean dead code
Deep audit changes:
- Replace stub signature aggregator with real SDK warp implementation
- Remove dead pkg/lpm package (SDK lpmintegration used instead)
- Fix fs imports: use local utils.FileExists, DirExists, ExpandHome
- Fix secp256k1fx imports: use node/vms/secp256k1fx
- Fix platformvm imports: use node/vms/platformvm
- Fix e2e test TODOs: uncomment BootstrapValidators assertions
- Improve localnet stub implementations with real logic
- Fix node.go fs.FileExists reference

Note: Build requires GOWORK=off due to workspace dependency issues
2026-01-10 11:17:00 -08:00

41 lines
800 B
Go

// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package models
import (
"testing"
"github.com/luxfi/netrunner/utils"
"github.com/stretchr/testify/require"
)
func TestGetVMID_imported(t *testing.T) {
assert := require.New(t)
testVMID := "abcd"
sc := Sidecar{
ImportedFromLPM: true,
ImportedVMID: testVMID,
}
vmid, err := sc.GetVMID()
assert.NoError(err)
assert.Equal(testVMID, vmid)
}
func TestGetVMID_derived(t *testing.T) {
assert := require.New(t)
testVMName := "chain"
sc := Sidecar{
ImportedFromLPM: false,
Name: testVMName,
}
expectedVMID, err := utils.VMID(testVMName)
assert.NoError(err)
vmid, err := sc.GetVMID()
assert.NoError(err)
assert.Equal(expectedVMID.String(), vmid)
}