Fixes #32599 - prevent to read facts without permissions #2076
Annotations
10 errors
Run rake test:units:
test/unit/fact_importer_test.rb#L672
Failure: test_0002_facts created have the origin attribute set
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
test/unit/fact_importer_test.rb:244:in `custom_import'
test/unit/fact_importer_test.rb:54:in `block (3 levels) in <class:FactImporterTest>'
|
Run rake test:units:
test/unit/fact_importer_test.rb#L47
Failure: test_0001_facts of other type do not collide even if they inherit from FactName
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
test/unit/fact_importer_test.rb:244:in `custom_import'
test/unit/fact_importer_test.rb:48:in `block (4 levels) in <class:FactImporterTest>'
test/unit/fact_importer_test.rb:47:in `block (3 levels) in <class:FactImporterTest>'
|
Run rake test:units:
test/models/host_test.rb#L672
Failure: test_0130_can search hosts by numeric and string facts
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
test/models/host_test.rb:1756:in `block in <class:HostTest>'
|
Run rake test:units:
test/models/host_test.rb#L1727
Failure: test_0127_makes one SQL query per host.facts_hash
Expected 2 queries, but got 5.
Expected: 2
Actual: 5
|
Run rake test:units:
test/models/host_test.rb#L1719
Failure: test_0126_makes only one SQL query when you pass specific fact names
Expected 1 queries, but got 3.
Expected: 1
Actual: 3
|
Run rake test:units:
test/models/host_test.rb#L1747
Failure: test_0129_facts does not cache if you pass fact names
Expected 3 queries, but got 7.
Expected: 3
Actual: 7
|
Run rake test:units:
test/models/host_test.rb#L1736
Failure: test_0128_facts caches facts_hash
Expected 1 queries, but got 3.
Expected: 1
Actual: 3
|
Run rake test:units:
test/unit/host_fact_importer_test.rb#L672
Failure: test_0014_should import facts idempotently
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
test/unit/host_fact_importer_test.rb:121:in `block in <class:HostFactImporterTest>'
|
Run rake test:units:
test/unit/host_fact_importer_test.rb#L672
Failure: test_0019_host is updated when uploading facts if setting is false
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
test/unit/host_fact_importer_test.rb:177:in `block in <class:HostFactImporterTest>'
|
Run rake test:units:
test/unit/host_fact_importer_test.rb#L672
Failure: test_0022_default taxonomies are not assigned to hosts with taxonomies
ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "name" is ambiguous
LINE 1: SELECT "name", "fact_values"."value", "fact_values"."id" FRO...
^
app/services/fact_importer.rb:140:in `update_facts'
app/services/fact_importer.rb:42:in `block in import!'
app/services/fact_importer.rb:40:in `import!'
app/services/host_fact_importer.rb:27:in `block in import_facts'
lib/foreman/telemetry_helper.rb:28:in `telemetry_duration_histogram'
app/services/host_fact_importer.rb:26:in `import_facts'
test/unit/host_fact_importer_test.rb:214:in `block in <class:HostFactImporterTest>'
|
Loading