You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
536 B
20 lines
536 B
package iceberg
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
)
|
|
|
|
func TestValidateCreateTableRequestRequiresName(t *testing.T) {
|
|
err := validateCreateTableRequest(CreateTableRequest{})
|
|
if !errors.Is(err, errTableNameRequired) {
|
|
t.Fatalf("validateCreateTableRequest() error = %v, want errTableNameRequired", err)
|
|
}
|
|
}
|
|
|
|
func TestValidateCreateTableRequestAcceptsWithName(t *testing.T) {
|
|
err := validateCreateTableRequest(CreateTableRequest{Name: "orders"})
|
|
if err != nil {
|
|
t.Fatalf("validateCreateTableRequest() error = %v, want nil", err)
|
|
}
|
|
}
|