Skip to content
Merged

Fix CI #1364

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on: [push, pull_request]
jobs:
test:
name: Run test suite
runs-on: ubuntu-20.04 # TODO: Change back to 'ubuntu-latest' when https://github.com/microsoft/mssql-docker/issues/899 resolved.
runs-on: ubuntu-latest
timeout-minutes: 10

env:
COMPOSE_FILE: docker-compose.ci.yml
Expand Down
12 changes: 8 additions & 4 deletions test/cases/rake_test_sqlserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,22 @@ class SQLServerRakeStructureDumpLoadTest < SQLServerRakeTest

it "dumps structure and accounts for defncopy oddities" do
skip "debug defncopy on windows later" if host_windows?

quietly { db_tasks.structure_dump configuration, filename }

_(filedata).wont_match %r{\AUSE.*\z}
_(filedata).wont_match %r{\AGO.*\z}
_(filedata).must_match %r{email\s+nvarchar\(4000\)}
_(filedata).must_match %r{background1\s+nvarchar\(max\)}
_(filedata).must_match %r{background2\s+text\s+}
_(filedata).must_match %r{\[?email\]?\s+nvarchar\(4000\)}
_(filedata).must_match %r{\[?background1\]?\s+nvarchar\(max\)}
_(filedata).must_match %r{\[?background2\]?\s+text\s+}
end

it "can load dumped structure" do
skip "debug defncopy on windows later" if host_windows?

quietly { db_tasks.structure_dump configuration, filename }
_(filedata).must_match %r{CREATE TABLE dbo\.users}

_(filedata).must_match %r{CREATE TABLE \[?dbo\]?\.\[?users\]?}
db_tasks.purge(configuration)
_(connection.tables).wont_include "users"
db_tasks.load_schema db_config, :sql, filename
Expand Down