splunk / splunk/addonfactory-solutions-library-python

allow test_hec_event_writer to be executed more than once per splunk instance

Abierto
#304 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
18
Forks
10
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

If solnlib integration tests are called second time locally with use of the same splunk instance, error like below will be raised.
`

  assert len(search_results) == 1

E assert 2 == 1
E + where 2 = len([{'_bkt': 'main15806ABEBD-E78E-4B8A-B1B0-5DC0ADD73AB5', '_cd': '15:210', '_indextime': '1691056507', '_raw': '[{"tes...me": "test_hec_event_writes_with_non_utf_8", "field_a": "Üü_Öö_Ää_some_text", "field_b": "some_text_Üü_Öö_Ää"}]', ...}])
If [the SPL](https://github.com/splunk/addonfactory-solutions-library-python/blob/d7b36323d0070d6f04195d78e282cd7fa0494b28/tests/integration/test_hec_event_writer.py#L63) is extended by condition like | where _time>{test_start_timestamp} AND _time<{test_end_timestamp}`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Start with tests/integration/test_hec_event_writer.py, especially the SPL at line 63, and reproduce the test twice against the same Splunk instance. Check how test_start_timestamp and test_end_timestamp can distinguish events from the current run; done means a repeated execution returns only the current test event and keeps the assertion at one result.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing-qa
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.