Skip to content

Commit 260c2b7

Browse files
authored
fix: update references to manifest to user proper terminology (#45)
Updates code where we refer to "driver list" as a manifest. Follow-on to #21
1 parent dc87827 commit 260c2b7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ func GetDriverList(fname string) ([]dbc.PkgInfo, error) {
2424
var m DriversList
2525
f, err := os.Open(fname)
2626
if err != nil {
27-
return nil, fmt.Errorf("error opening manifest file %s: %w", fname, err)
27+
return nil, fmt.Errorf("error opening driver list %s: %w", fname, err)
2828
}
2929
defer f.Close()
3030
if err = toml.NewDecoder(f).Decode(&m); err != nil {
31-
return nil, fmt.Errorf("error decoding manifest file %s: %w", fname, err)
31+
return nil, fmt.Errorf("error decoding driver list %s: %w", fname, err)
3232
}
3333

3434
drivers, err := dbc.GetDriverList()
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/stretchr/testify/require"
1717
)
1818

19-
func TestUnmarshalManifestList(t *testing.T) {
19+
func TestUnmarshalDriverList(t *testing.T) {
2020
tests := []struct {
2121
name string
2222
contents string
@@ -37,10 +37,10 @@ func TestUnmarshalManifestList(t *testing.T) {
3737
for _, tt := range tests {
3838
t.Run(tt.name, func(t *testing.T) {
3939
tmpdir := t.TempDir()
40-
manifestPath := filepath.Join(tmpdir, "manifest.txt")
41-
require.NoError(t, os.WriteFile(manifestPath, []byte(tt.contents), 0644))
40+
driverListPath := filepath.Join(tmpdir, "dbc.toml")
41+
require.NoError(t, os.WriteFile(driverListPath, []byte(tt.contents), 0644))
4242

43-
pkgs, err := GetDriverList(manifestPath)
43+
pkgs, err := GetDriverList(driverListPath)
4444
if tt.err != nil {
4545
require.Error(t, err)
4646
assert.ErrorContains(t, err, tt.err.Error())
@@ -72,7 +72,7 @@ func must[T any](v T, err error) T {
7272
return v
7373
}
7474

75-
func TestMarshalManifestList(t *testing.T) {
75+
func TestMarshalDriverManifestList(t *testing.T) {
7676
data, err := toml.Marshal(DriversList{
7777
Drivers: map[string]driverSpec{
7878
"flightsql": {Version: must(semver.NewConstraint(">=1.6.0"))},

0 commit comments

Comments
 (0)