Skip to content

Commit fbe4b69

Browse files
craig[bot]yuzefovich
andcommitted
156802: logictest: remove stale mixed-version skips r=yuzefovich a=yuzefovich Also adjust `role` test file to run with mixed versions. Epic: None Release note: None 156872: ldr: update external-process test tenant issue r=yuzefovich a=yuzefovich Informs: #134857. Epic: None Release note: None Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
3 parents 0a58aa1 + 287c88e + b269125 commit fbe4b69

File tree

9 files changed

+51
-42
lines changed

9 files changed

+51
-42
lines changed

pkg/ccl/logictestccl/testdata/logic_test/provisioning

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# LogicTest: !local-mixed-24.3 !local-mixed-25.1 !local-mixed-25.2
1+
# LogicTest: !local-mixed-25.2
22
# Tests for parsing/validation of the PROVISIONSRC role option.
33

44
statement error role "root" cannot have a PROVISIONSRC

pkg/ccl/logictestccl/testdata/logic_test/show_create

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ r1 CREATE FUNCTION public.r1(i INT8)
9191
SELECT 1;
9292
$$
9393

94-
skipif config local-mixed-23.1
9594
query TT
9695
SELECT * FROM [SHOW CREATE PROCEDURE r1] ORDER BY 2
9796
----

pkg/crosscluster/logical/logical_replication_job_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var (
8383

8484
testClusterBaseClusterArgs = base.TestClusterArgs{
8585
ServerArgs: base.TestServerArgs{
86-
DefaultTestTenant: base.TestDoesNotWorkWithExternalProcessMode(127241),
86+
DefaultTestTenant: base.TestDoesNotWorkWithExternalProcessMode(134857),
8787
Knobs: base.TestingKnobs{
8888
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
8989
},

pkg/sql/logictest/testdata/logic_test/alter_column_type

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,6 @@ ALTER TABLE stored1 ALTER COLUMN comp1 SET DATA TYPE INT2 USING -1;
15921592
statement ok
15931593
INSERT INTO stored1 VALUES (-1000);
15941594

1595-
skipif config local-mixed-24.3
15961595
onlyif config schema-locked-disabled
15971596
query TT
15981597
SHOW CREATE TABLE stored1;
@@ -1980,7 +1979,6 @@ select * from t_multi_alter order by c1;
19801979
10 10 2024-04-22 00:00:00 +0000 +0000
19811980
20 20 2024-04-22 00:00:00 +0000 +0000
19821981

1983-
skipif config local-mixed-24.3
19841982
onlyif config schema-locked-disabled
19851983
query TT colnames
19861984
show create table t_multi_alter

pkg/sql/logictest/testdata/logic_test/role

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# LogicTest: local 3node-tenant
1+
# LogicTest: local local-mixed-25.2 local-mixed-25.3 local-mixed-25.4 3node-tenant
22

33
statement error a role/user named admin already exists
44
CREATE ROLE admin
@@ -1532,25 +1532,31 @@ subtest end
15321532

15331533
subtest validate_alter_provisioned_user_restrictions
15341534

1535+
skipif config local-mixed-25.2
15351536
# Changing PROVISIONSRC privilege for provisioned users is disallowed even for
15361537
# ADMIN users, they can only be dropped.
15371538
statement ok
15381539
DROP ROLE testuser
15391540

1541+
skipif config local-mixed-25.2
15401542
statement ok
15411543
CREATE USER testuser with PROVISIONSRC 'ldap:example.com'
15421544

1545+
skipif config local-mixed-25.2
15431546
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15441547
ALTER ROLE testuser WITH PROVISIONSRC 'ldap:example.com'
15451548

1549+
skipif config local-mixed-25.2
15461550
statement ok
15471551
SET ROLE testuser
15481552

1553+
skipif config local-mixed-25.2
15491554
# Changing users with SET ROLE should now disallow self-password/provisionsrc
15501555
# change as role has a PROVISIONSRC privilege.
15511556
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15521557
ALTER USER testuser PASSWORD 'cat'
15531558

1559+
skipif config local-mixed-25.2
15541560
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15551561
ALTER USER testuser PROVISIONSRC 'ldap:example2.com'
15561562

@@ -1559,24 +1565,30 @@ RESET ROLE
15591565

15601566
user testuser
15611567

1568+
skipif config local-mixed-25.2
15621569
# Verify that now provisioned testuser can't change its own password or provisionsrc.
15631570
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15641571
ALTER USER testuser PASSWORD 'xyz'
15651572

1573+
skipif config local-mixed-25.2
15661574
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15671575
ALTER USER CURRENT_USER PASSWORD '123'
15681576

1577+
skipif config local-mixed-25.2
15691578
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15701579
ALTER USER testuser PROVISIONSRC 'ldap:example2.com'
15711580

1581+
skipif config local-mixed-25.2
15721582
# Verify that provisioned testuser still cannot *remove* its own password.
15731583
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15741584
ALTER USER testuser PASSWORD NULL
15751585

1586+
skipif config local-mixed-25.2
15761587
# testuser still cannot change another user's password.
15771588
statement error pq: user testuser does not have CREATEROLE privilege
15781589
ALTER USER testuser2 WITH PASSWORD 'abc'
15791590

1591+
skipif config local-mixed-25.2
15801592
# Verify that testuser still cannot modify other role options of itself.
15811593
statement error pq: cannot alter PASSWORD/PROVISIONSRC option for provisioned user testuser
15821594
ALTER USER testuser PASSWORD 'abc' VALID UNTIL '4044-10-31'
@@ -1951,24 +1963,20 @@ subtest provisionsrc
19511963

19521964
skipif config 3node-tenant
19531965
skipif config local-mixed-25.2
1954-
skipif config local-mixed-25.1
1955-
skipif config local-mixed-24.3
19561966
statement ok
19571967
CREATE ROLE role_with_provisioning PROVISIONSRC 'ldap:ldap.example.com'
19581968

19591969
skipif config 3node-tenant
19601970
skipif config local-mixed-25.2
1961-
skipif config local-mixed-25.1
1962-
skipif config local-mixed-24.3
19631971
statement ok
19641972
ALTER ROLE testuser PROVISIONSRC 'ldap:ldap.example.com'
19651973

1966-
onlyif config local-mixed-24.3
1967-
statement error SUBJECT role option is only supported after v25.3 upgrade is finalized
1974+
onlyif config local-mixed-25.2
1975+
statement error PROVISIONSRC role option is only supported after v25.3 upgrade is finalized
19681976
CREATE ROLE role_with_provisioning PROVISIONSRC 'ldap:ldap.example.com'
19691977

1970-
onlyif config local-mixed-24.3
1971-
statement error SUBJECT role option is only supported after v25.3 upgrade is finalized
1978+
onlyif config local-mixed-25.2
1979+
statement error PROVISIONSRC role option is only supported after v25.3 upgrade is finalized
19721980
ALTER ROLE testuser PROVISIONSRC 'ldap:ldap.example.com'
19731981

19741982
subtest end

pkg/sql/logictest/testdata/logic_test/schema_locked

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -95,43 +95,27 @@ CREATE TABLE t (i INT PRIMARY KEY, j INT, UNIQUE INDEX idx (j)) WITH (schema_loc
9595
statement ok
9696
INSERT INTO t SELECT i, i+1 FROM generate_series(1,10) AS tmp(i);
9797

98-
onlyif config local-mixed-25.1 local-legacy-schema-changer
98+
onlyif config local-legacy-schema-changer
9999
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
100100
ALTER TABLE t ADD COLUMN k INT DEFAULT 30;
101101

102-
onlyif config local-mixed-25.1 local-legacy-schema-changer
102+
onlyif config local-legacy-schema-changer
103103
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
104104
ALTER TABLE t DROP COLUMN j;
105105

106-
onlyif config local-mixed-25.1
107-
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
108-
ALTER TABLE t RENAME TO t2;
109-
110-
onlyif config local-mixed-25.1
111-
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
112-
ALTER TABLE t RENAME COLUMN j TO j2;
113-
114-
onlyif config local-mixed-25.1
115-
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
116-
ALTER INDEX idx RENAME TO idx2;
117-
118-
onlyif config local-mixed-25.1
119-
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
120-
ALTER INDEX idx INVISIBLE;
121-
122-
onlyif config local-mixed-25.1 local-legacy-schema-changer
106+
onlyif config local-legacy-schema-changer
123107
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
124108
DROP INDEX idx;
125109

126-
onlyif config local-mixed-25.1 local-legacy-schema-changer
110+
onlyif config local-legacy-schema-changer
127111
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
128112
CREATE INDEX idx2 ON t(j);
129113

130114
statement ok
131115
CREATE TABLE ref (a INT PRIMARY KEY, b INT)
132116

133117
# Locked tables cannot be referenced by foreign keys.
134-
onlyif config local-mixed-25.1 local-legacy-schema-changer
118+
onlyif config local-legacy-schema-changer
135119
statement error pgcode 57000 this schema change is disallowed because table "t" is locked and this operation cannot automatically unlock the table
136120
ALTER TABLE ref ADD CONSTRAINT fk FOREIGN KEY (b) REFERENCES t(j);
137121

@@ -151,23 +135,23 @@ subtest end
151135
# Declarative schema change can automatically unset and set schema locked.
152136
subtest declarative_allows_schema_changes
153137

154-
skipif config local-mixed-25.1 local-legacy-schema-changer
138+
skipif config local-legacy-schema-changer
155139
statement ok
156140
ALTER TABLE t ADD COLUMN k INT DEFAULT 30;
157141

158-
skipif config local-mixed-25.1 local-legacy-schema-changer
142+
skipif config local-legacy-schema-changer
159143
statement ok
160144
CREATE INDEX idx2 ON t(j);
161145

162-
skipif config local-mixed-25.1 local-legacy-schema-changer
146+
skipif config local-legacy-schema-changer
163147
statement ok
164148
DROP INDEX idx2;
165149

166-
skipif config local-mixed-25.1 local-legacy-schema-changer
150+
skipif config local-legacy-schema-changer
167151
statement ok
168152
ALTER TABLE ref ADD CONSTRAINT fk FOREIGN KEY (b) REFERENCES t(j);
169153

170-
skipif config local-mixed-25.1 local-legacy-schema-changer
154+
skipif config local-legacy-schema-changer
171155
statement ok
172156
ALTER TABLE t DROP COLUMN j CASCADE;
173157

@@ -177,7 +161,7 @@ SELECT count(create_statement) FROM [SHOW CREATE TABLE t] WHERE create_statement
177161
----
178162
1
179163

180-
onlyif config local-mixed-25.1 local-legacy-schema-changer
164+
onlyif config local-legacy-schema-changer
181165
statement ok
182166
ALTER TABLE t SET (schema_locked = false);
183167

@@ -216,7 +200,6 @@ CREATE TABLE t_147993 (
216200

217201

218202
skipif config local-legacy-schema-changer
219-
skipif config local-mixed-25.1
220203
statement ok
221204
SELECT AddGeometryColumn ('t_147993','geom7',4326,'POINT',2),
222205
AddGeometryColumn ('t_147993','geom8',4326,'POINT',2);

pkg/sql/logictest/tests/local-mixed-25.2/generated_test.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/sql/logictest/tests/local-mixed-25.3/generated_test.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/sql/logictest/tests/local-mixed-25.4/generated_test.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)