Documentation
¶
Overview ¶
Package httpsfixture is the downloads a test serves through test/e2e/httpsserver: the runner harness from a container, and the https-sources acceptance phase on kind. One definition, so the documents the harness captures answer the files the phase reads.
Every archive is built with fixed times, owners and modes, so the same definition gives the same bytes and the same download digest on every run.
Index ¶
Constants ¶
const ( // SchemaFile is a schema served as one file. SchemaFile = "schema.sql" // MigrationArchive is a gzip-compressed tar holding the migration // directory under MigrationPath. MigrationArchive = "migrations.tar.gz" // SchemaArchive is a zip holding the schema at SchemaInArchive, beside a // file no source selects. SchemaArchive = "schema.zip" // SchemaArchiveRepublished holds the same selected file as SchemaArchive // in other bytes: the file beside it says something else. SchemaArchiveRepublished = "schema-republished.zip" // DotDotArchive holds an entry that names a path outside the archive. DotDotArchive = "dotdot.tar.gz" // SymlinkArchive holds a symbolic link inside the selected directory. SymlinkArchive = "symlink.tar.gz" MigrationPath = "orders-1.0/db/migrations" SchemaInArchive = "app-1.0/db/schema.sql" )
The names the server serves the downloads by, and what each one selects.
const Schema = "CREATE TABLE e2e_https_items (\n id bigint NOT NULL PRIMARY KEY,\n name text NOT NULL\n);\n"
Schema is the desired schema every schema download carries.
Variables ¶
var MigrationFiles = map[string]string{
"0000000001_create_https_parts.up.sql": "CREATE TABLE e2e_https_parts (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL\n);\n",
"0000000001_create_https_parts.down.sql": "DROP TABLE e2e_https_parts;\n",
"0000000002_add_https_sku.up.sql": "ALTER TABLE e2e_https_parts ADD COLUMN sku TEXT;\n",
"0000000002_add_https_sku.down.sql": "ALTER TABLE e2e_https_parts DROP COLUMN sku;\n",
}
MigrationFiles is the migration directory the archive carries.
Functions ¶
func MigrationContent ¶
MigrationContent is the content digest of the migration directory.
func SchemaContent ¶
SchemaContent is the content digest of the schema as the operator binds it: one file, by its own name.
Types ¶
This section is empty.