You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run a specific test case, use minitest's `-n` option to run tests that match a given pattern. All minitest options are set via the `TESTOPTS` environemnt variable. For example, to run `test_indexes` from CockroachDB's `test/cases/adapter_test.rb` file
88
52
89
53
```bash
90
-
TEST_FILES="test/cases/adapter_test.rb" TESTOPTS=`-n=/test_indexes/` bundle exec rake test
54
+
TEST_FILES="test/cases/adapter_test.rb" TESTOPTS=`--name=/test_indexes/` bundle exec rake test
91
55
```
92
56
57
+
You can also use the constant `COCKROACH_SKIP_LOAD_SCHEMA` to avoid reloading the schema every time (faster).
58
+
Only do it if you know the schema was left in a correct state.
59
+
93
60
`test/config.yml` assumes CockroachDB will be running at localhost:26257 with a root user. Make changes to `test/config.yml` as needed.
94
61
95
62
### Run Tests from a Backup
@@ -121,7 +88,6 @@ master branch, with an alpha build of CockroachDB. it would be even
121
88
better to be able to test multiple versions of the adapter, and do so
122
89
against different versions of CockroachDB.
123
90
124
-
125
91
## Adding feature support
126
92
127
93
As CockroachDB improves, so do the features that can be supported in
@@ -131,15 +97,36 @@ gates should be toggled. Something that would help this process would be
131
97
linking those issues back to this adapter so that part of the feature
132
98
completing includes updating the adapter.
133
99
134
-
135
-
## Execute only tests that run with a connection
136
-
137
-
I have not investigated if this is already possible, but I would assume
138
-
no.
139
-
140
-
A possible way to approach this would be to add a shim to cause any
141
-
tests that use it to fail, and grep the tests that pass and then skip
142
-
them.
100
+
## Upgrading Rails
101
+
102
+
Whenever you upgrade rails version, loads of things will change.
103
+
This section intent to help you with a checklist.
104
+
105
+
- Check for TODO or NOTE tags that are referencing the old or new version of
106
+
rails.
107
+
```bash
108
+
rg 'TODO|NOTE' --after-context=2
109
+
```
110
+
- Check postgresql_specific_schema.rb changelog in rails, and apply the changes
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,22 @@
1
1
# ActiveRecord CockroachDB Adapter
2
2
3
-
CockroachDB adapter for ActiveRecord 5, 6, and 7. This is a lightweight extension of the PostgreSQL adapter that establishes compatibility with [CockroachDB](https://github.com/cockroachdb/cockroach).
3
+
CockroachDB adapter for ActiveRecord. This is a lightweight extension
4
+
of the PostgreSQL adapter that establishes compatibility with [CockroachDB](https://github.com/cockroachdb/cockroach).
0 commit comments