Project

General

Profile

Actions

Bug #25941

closed

Spurious failing test for inherited properties rest API

Added by François ARMAND about 1 month ago. Updated 24 days ago.

Status:
Released
Priority:
N/A
Category:
Architecture - Test
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

Sometime, we get:

[2024-11-22T14:57:59.084Z]   + Tests defined in 'api_nodes' yaml
[2024-11-22T14:57:59.084Z]     + [0] Get node (minimal)
[2024-11-22T14:57:59.084Z]     + [1] Get node (full) before v20
[2024-11-22T14:57:59.084Z]     + [2] Get node (full)
[2024-11-22T14:57:59.084Z]     + [3] List node with select and include managementTechnology
[2024-11-22T14:57:59.084Z]     + [4] Create a node without a manufacturer, old style
[2024-11-22T14:57:59.084Z]     + [5] Create a node with a manufacturer, new style
[2024-11-22T14:57:59.084Z]     + [6] Create node with some validation errors
[2024-11-22T14:57:59.084Z]     + [7] Update given node information (node properties, policy mode...)
[2024-11-22T14:57:59.084Z]     + [8] Update given node information (node properties, policy mode...) with query parameters
[2024-11-22T14:57:59.084Z]     + [9] Delete given node
[2024-11-22T14:57:59.084Z]     + [10] Check that the new node has a manufacturer
[2024-11-22T14:57:59.084Z]     + [11] List all pending nodes with configurable details level
[2024-11-22T14:57:59.084Z]     + [12] Accept pending nodes
[2024-11-22T14:57:59.084Z]     + [13] Refuse pending nodes
[2024-11-22T14:57:59.084Z]     + [14] List no pending nodes after acceptation and refusal
[2024-11-22T14:57:59.084Z]     + [15] Accept or refuse pending nodes fail without node
[2024-11-22T14:57:59.084Z]     + [16] Accept or refuse pending nodes fail without status
[2024-11-22T14:57:59.084Z]     + [17] Accept or refuse pending nodes fail without body
[2024-11-22T14:57:59.084Z]     + [18] Accept or refuse given pending node
[2024-11-22T14:57:59.084Z]     + [19] Accept or refuse given pending node without status
[2024-11-22T14:57:59.084Z]     + [20] Get the status (pending, accepted, unknown) of the comma separated list of nodes given by `ids` parameter
[2024-11-22T14:57:59.084Z]     + [21] Get the status (pending, accepted, unknown) of the comma separated list of nodes given by empty `ids` parameter
[2024-11-22T14:57:59.084Z]     + [22] Ask given node to start a run with the given policy for Dsc agent
[2024-11-22T14:57:59.084Z]     + [23] Ask given node to start a run with the given policy for unknown node
[2024-11-22T14:57:59.084Z]     + [24] Getting a software version for a set of Nodes
[2024-11-22T14:57:59.084Z]     + [25] Getting data to build a Node table
[2024-11-22T14:57:59.084Z]     + [26] Getting data to build a Node table with software and properties
[2024-11-22T14:57:59.084Z]     - [27] Get all properties for that node, included inherited ones
[2024-11-22T14:57:59.084Z]       ✗ There was a difference
[2024-11-22T14:57:59.084Z]         Expected:
[2024-11-22T14:57:59.086Z]                  {
[2024-11-22T14:57:59.086Z]         +          "name" : "someJson",
[2024-11-22T14:57:59.086Z]         +          "value" : "string",
[2024-11-22T14:57:59.086Z]         +          "inheritMode" : "opa",
[2024-11-22T14:57:59.086Z]         +          "provider" : "inherited",
[2024-11-22T14:57:59.086Z]         +          "hierarchy" : [
[2024-11-22T14:57:59.086Z]         +            {
[2024-11-22T14:57:59.086Z]         +              "kind" : "global",
[2024-11-22T14:57:59.086Z]         +              "value" : "string" 
[2024-11-22T14:57:59.086Z]         +            }
[2024-11-22T14:57:59.086Z]         +          ],
[2024-11-22T14:57:59.086Z]         +          "hierarchyStatus" : {
[2024-11-22T14:57:59.086Z]         +            "hasChildTypeConflicts" : false,
[2024-11-22T14:57:59.086Z]         +            "fullHierarchy" : [
[2024-11-22T14:57:59.086Z]         +              {
[2024-11-22T14:57:59.086Z]         +                "kind" : "global",
[2024-11-22T14:57:59.086Z]         +                "valueType" : "String" 
[2024-11-22T14:57:59.086Z]         +              }
[2024-11-22T14:57:59.086Z]         +            ]
[2024-11-22T14:57:59.086Z]         +          },
[2024-11-22T14:57:59.086Z]         +          "origval" : "string" 
[2024-11-22T14:57:59.086Z]         +        },
[2024-11-22T14:57:59.086Z]         +        {
[2024-11-22T14:57:59.086Z]                    "name" : "someJson2",
[2024-11-22T14:57:59.086Z]                    "value" : "string",
...

So something is broken in the order of tests

Actions #1

Updated by François ARMAND about 1 month ago

In a working local test set run, it seems to be the same order:

TestRestFromFileDef.[0] Get node (minimal)
TestRestFromFileDef.[1] Get node (full) before v20
TestRestFromFileDef.[2] Get node (full)
TestRestFromFileDef.[3] List node with select and include managementTechnology
TestRestFromFileDef.[4] Create a node without a manufacturer, old style
TestRestFromFileDef.[5] Create a node with a manufacturer, new style
TestRestFromFileDef.[6] Create node with some validation errors
TestRestFromFileDef.[7] Update given node information (node properties, policy mode...)
TestRestFromFileDef.[8] Update given node information (node properties, policy mode...) with query parameters
TestRestFromFileDef.[9] Delete given node
TestRestFromFileDef.[10] Check that the new node has a manufacturer
TestRestFromFileDef.[11] List all pending nodes with configurable details level
TestRestFromFileDef.[12] Accept pending nodes
TestRestFromFileDef.[13] Refuse pending nodes
TestRestFromFileDef.[14] List no pending nodes after acceptation and refusal
TestRestFromFileDef.[15] Accept or refuse pending nodes fail without node
TestRestFromFileDef.[16] Accept or refuse pending nodes fail without status
TestRestFromFileDef.[17] Accept or refuse pending nodes fail without body
TestRestFromFileDef.[18] Accept or refuse given pending node
TestRestFromFileDef.[19] Accept or refuse given pending node without status
TestRestFromFileDef.[20] Get the status (pending, accepted, unknown) of the comma separated list of nodes given by `ids` parameter
TestRestFromFileDef.[21] Get the status (pending, accepted, unknown) of the comma separated list of nodes given by empty `ids` parameter
TestRestFromFileDef.[22] Ask given node to start a run with the given policy for Dsc agent
TestRestFromFileDef.[23] Ask given node to start a run with the given policy for unknown node
TestRestFromFileDef.[24] Getting a software version for a set of Nodes
TestRestFromFileDef.[25] Getting data to build a Node table
TestRestFromFileDef.[26] Getting data to build a Node table with software and properties
TestRestFromFileDef.[27] Get all properties for that node, included inherited ones
TestRestFromFileDef.[28] Getting a property value for a set of Nodes (all nodes)
TestRestFromFileDef.[29] Get node (minimal)
TestRestFromFileDef.[30] Add Json property
TestRestFromFileDef.[31] Get node (minimal)
TestRestFromFileDef.[32] Delete Json property
Actions #2

Updated by François ARMAND about 1 month ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #3

Updated by François ARMAND about 1 month ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Clark ANDRIANASOLO
  • Pull Request set to https://github.com/Normation/rudder/pull/6041
Actions #4

Updated by Anonymous about 1 month ago

  • Status changed from Pending technical review to Pending release
Actions #5

Updated by François ARMAND 28 days ago

  • Fix check changed from To do to Checked
Actions #6

Updated by Vincent MEMBRÉ 24 days ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.2.2 which was released today.

Actions

Also available in: Atom PDF