Files
gocqlx/migrate/checksum_test.go
Michał Matczuk fe1498fe13 migrate: add support for new Go io/fs.FS
This patch adds FromFS function and lets you use the new go:embed directive to add the migration files to the binary.
Also, migration tests use an in memory FS impl instead of working with tmp directories.
2021-04-30 11:19:14 +02:00

21 lines
374 B
Go

// Copyright (C) 2017 ScyllaDB
// Use of this source code is governed by a ALv2-style
// license that can be found in the LICENSE file.
package migrate
import (
"os"
"testing"
)
func TestFileChecksum(t *testing.T) {
c, err := fileChecksum(os.DirFS("testdata"), "file")
if err != nil {
t.Fatal(err)
}
if c != "bbe02f946d5455d74616fc9777557c22" {
t.Fatal(c)
}
}